package app.fugema.shop.main.invoice.adapter;

import android.view.View;

import com.base.common.view.adapter.ada.GeneralRecyclerAdapter;
import com.base.common.view.adapter.connector.BaseUniversalItemMultiType;

import app.fugema.shop.R;
import app.fugema.shop.main.center.model.TotalIntegralBean;
import app.fugema.shop.main.center.view.GiftOrdersActivity;

/**
 * 积分 列表
 */
public class IntegralListAdapter extends GeneralRecyclerAdapter
{

    @Override
    public void initMultiItemType()
    {
        putMultiItemType(new BaseUniversalItemMultiType<TotalIntegralBean>(R.layout.header_integral_record_view)
        {
            @Override
            public int getItemViewType() {
                return TYPE_HEAD;
            }

            @Override
            public void onItemClick(View view, int onclickType, int position, TotalIntegralBean bean)
            {
                super.onItemClick(view, onclickType, position, bean);
                switch (view.getId())
                {
                    case R.id.btn_record:
                        // 积分记录
                        GiftOrdersActivity.start(view.getContext(),0);
                        break;
                }
            }


        });
        //积分
        putMultiItemType( new IntegralItemMultiType() );
    }

}
